﻿<Controls:WtfDocumentContent x:Class="ApplicationUI.FileSystemViewer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Controls="clr-namespace:WtfManager.Controls;assembly=WtfManager.Controls"
    xmlns:ApplicationUI="clr-namespace:ApplicationUI"
    xmlns:HierarchicalData="clr-namespace:WtfManager.HierarchicalData;assembly=WtfManager.HierarchicalDataManager"
    xmlns:Commands="clr-namespace:WtfManager.UIManager.Commands;assembly=WtfManager.UIManager"
    Height="Auto" Width="Auto"
    Title="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Data.Name}" >
  
  <Controls:WtfDocumentContent.Resources>
    <DataTemplate x:Key="fileSysteItemTemplate">
      <ApplicationUI:FileSystemView Width="Auto" Height="Auto" />
    </DataTemplate>
  </Controls:WtfDocumentContent.Resources>

  <Controls:WtfDocumentContent.InputBindings>
    <KeyBinding Command="ApplicationCommands.Close" Key="W" Modifiers="Control" />
  </Controls:WtfDocumentContent.InputBindings>

  <Controls:WtfDocumentContent.DataTemplate>
    <StaticResource ResourceKey="fileSysteItemTemplate" />
  </Controls:WtfDocumentContent.DataTemplate>
  
  <Controls:WtfDocumentContent.Icon>
    <Image Name="icon" Width="16" Height="16" 
           Source="{Binding Converter={x:Static HierarchicalData:TreeItemToImageConverter.Instance}}" />
  </Controls:WtfDocumentContent.Icon>
    
</Controls:WtfDocumentContent>
